import request from '@/utils/request'

// 查询出库单据列表
export function listReceipt(query) {
  return request({
    url: '/exitwarehouse/exit/list',
    method: 'get',
    params: query
  })
}

// 查询出库单据详细
export function getReceipt(exitWarehouseId) {
  return request({
    url: '/exitwarehouse/exit/' + exitWarehouseId,
    method: 'get'
  })
}

// 新增出库单据
export function addReceipt(data) {
  return request({
    url: '/exitwarehouse/exit',
    method: 'post',
    data: data
  })
}

// 修改出库单据
export function updateReceipt(data) {
  return request({
    url: '/exitwarehouse/exit',
    method: 'put',
    data: data
  })
}

// 删除出库单据
export function delReceipt(exitWarehouseId) {
  return request({
    url: '/exitwarehouse/exit/' + exitWarehouseId,
    method: 'delete'
  })
}

// 修改出库状态
export function revokeExitWarehouse(data) {
  return request({
    url: '/exitwarehouse/exit/revoke',
    method: 'put',
    data: data
  })
}

// 查询重量
export function getExitWeightSum(query) {
  return request({
    url: '/exitwarehouse/exit/exitweightsum',
    method: 'get',
    params: query
  })
}
